package com.sky.utils;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;

public class DataListUtil {
    /**
     * 获取一个区间内的时间对象集合工具
     *
     * @param begin
     * @param end
     * @return
     */
    public static List<LocalDate> getDateList(LocalDate begin, LocalDate end) {
        List<LocalDate> dateList = new ArrayList<LocalDate>();
        dateList.add(begin);
        while (!begin.equals(end)) {
            begin = begin.plusDays(1);
            dateList.add(begin);
        }
        return dateList;
    }
}
